package ee.ts022.tuum.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ee.ts022.tuum.dao.ContractStatusTypeDao;
import ee.ts022.tuum.dao.ContractTypeDao;
import ee.ts022.tuum.domain.ContractStatusType;
import ee.ts022.tuum.domain.ContractType;

@Service
public class ClassifiersServiceImpl implements ClassifiersService {
	
	@Autowired
	private ContractTypeDao contractTypeDao;
	@Autowired
	private ContractStatusTypeDao contractStatusTypeDao;

	@Transactional
	public List<ContractType> getContractTypes() {
		return contractTypeDao.getAll();
	}

	@Transactional
	public ContractType getContractType(int id) {
		return contractTypeDao.get(id);
	}

	@Transactional
	public ContractStatusType getContractStatusType(int id) {
		return contractStatusTypeDao.get(id);
	}

}
